<template>
  <div class="person">
    <h2>当前求和为：{{ sum }}</h2>
    <h2>放大10倍后为：{{ bigSum }}</h2>
    <button @click="add">点击+1</button>
    <hr />
    <img v-for="(dog, index) in dogList" :src="dog" :key="index" />
    <br />
    <button @click="addDog">再来一只</button>
  </div>
</template>

<script lang="ts" setup name="Person1">
  import useDog from '@/hooks/useDog'
  import userSum from '@/hooks/useSum'
  const { dogList,addDog }=useDog()
  const {sum,add,bigSum}=userSum()

</script>

<style scoped>
.person {
  background-color: #8eace8;
  box-shadow: 0 0 10px;
  border-radius: 10px;
}

img {
  height: 100px;
}
</style>
